(function($){  

   $.fn.scrollTop = function (options) {
        var defaults = {
            mParent : 'ul',
            mTags : 'li',
            mSpeed : 3000
        };
        var opts = $.extend({}, defaults, options);
        var pDiv = $(this);

        var mUl = pDiv.find(opts.mParent).eq(0);
        var mLi = mUl.find(opts.mTags);
        var mTop = mLi.eq(0).outerHeight();
        var mRatio = 1;

        //mUl.html(mUl.html() + mUl.html());
        scrollAuto();

        pDiv.hover(function(){
            mUl.stop();
            mRatio = (1 - Math.abs(parseFloat(mUl.css('margin-top')))/mTop);
        },function(){
            scrollAuto();
        });

        function scrollAuto() {
            mUl.animate({'marginTop' : '-' + mTop + 'px'}, opts.mSpeed * mRatio, 'linear', function(){
                mLi.eq(0).appendTo(mUl);
                mUl.css({'margin-top' : 0});
                mLi = mUl.find(opts.mTags);
                mRatio = 1;
                scrollAuto()
            });
        }
    }

})(jQuery);  
